home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Freelog 117
/
FreelogNo117-OctobreNovembre2013.iso
/
Programmation
/
jedit
/
jedit5.1.0install.exe
/
{app}
/
modes
/
html.xml
< prev
next >
Wrap
Extensible Markup Language
|
2013-07-28
|
12KB
|
352 lines
<?xml version="1.0"?>
<!DOCTYPE MODE SYSTEM "xmode.dtd">
<MODE>
<PROPS>
<PROPERTY NAME="commentStart" VALUE="<!--" />
<PROPERTY NAME="commentEnd" VALUE="-->" />
</PROPS>
<RULES IGNORE_CASE="TRUE">
<!-- SGML comment -->
<SPAN TYPE="COMMENT1">
<BEGIN><!--</BEGIN>
<END>--></END>
</SPAN>
<!-- JavaScript -->
<SEQ_REGEXP TYPE="MARKUP" DELEGATE="SCRIPT_TAG"
HASH_CHAR="<"><(?=SCRIPT\b)</SEQ_REGEXP>
<!-- stylesheet -->
<SEQ_REGEXP TYPE="MARKUP" DELEGATE="STYLE_TAG"
HASH_CHAR="<"><(?=STYLE\b)</SEQ_REGEXP>
<!-- DTD instructions -->
<SPAN TYPE="KEYWORD2" DELEGATE="xml::DTD-TAGS">
<BEGIN><!</BEGIN>
<END>></END>
</SPAN>
<!-- markup tags -->
<SPAN TYPE="MARKUP" DELEGATE="TAGS">
<BEGIN><</BEGIN>
<END>></END>
</SPAN>
<!-- SGML entities -->
<SPAN TYPE="LITERAL2" NO_WORD_BREAK="TRUE">
<BEGIN>&</BEGIN>
<END>;</END>
</SPAN>
</RULES>
<!-- ESCAPE is not exactly right but it is needed to correctly
handle JavaScript in on* parameters.
NOTE: ESCAPE moved from RULE to SPANs! -->
<RULES SET="TAGS" DEFAULT="MARKUP">
<!-- Inline CSS -->
<SPAN_REGEXP AT_WORD_START="TRUE" TYPE="MARKUP" DELEGATE="css::PROPERTIES" HASH_CHAR="style">
<BEGIN>style\s*=\s*(["'])</BEGIN>
<END>$1</END>
</SPAN_REGEXP>
<!-- Javascript: delegate on* attributes to Javascript mode -->
<SPAN_REGEXP AT_WORD_START="TRUE" DELEGATE="javascript::MAIN" HASH_CHAR="on" TYPE="MARKUP">
<BEGIN>on[a-z]+\s*=\s*(["'])</BEGIN>
<END>$1</END>
</SPAN_REGEXP>
<!-- NOTE: no ESCAPE for quotes, at least for attributes; e.g onclick="alert(\"foo\");" is invalid! -->
<SPAN TYPE="LITERAL1" DELEGATE="STRING">
<BEGIN>"</BEGIN>
<END>"</END>
</SPAN>
<SPAN TYPE="LITERAL1" DELEGATE="STRING">
<BEGIN>'</BEGIN>
<END>'</END>
</SPAN>
<SEQ TYPE="OPERATOR">=</SEQ>
<KEYWORDS>
<!-- HTML/XHTML elements, taken from http://de.selfhtml.org/html/referenz/elemente.htm -->
<!-- updated to include html5 elements. Obsolete and deprecated elements
are still here for backward compatibility. -->
<KEYWORD1>a</KEYWORD1>
<KEYWORD1>abbr</KEYWORD1>
<KEYWORD1>acronym</KEYWORD1>
<KEYWORD1>address</KEYWORD1>
<KEYWORD1>applet</KEYWORD1>
<KEYWORD1>area</KEYWORD1>
<KEYWORD1>article</KEYWORD1>
<KEYWORD1>aside</KEYWORD1>
<KEYWORD1>audio</KEYWORD1>
<KEYWORD1>b</KEYWORD1>
<KEYWORD1>base</KEYWORD1>
<KEYWORD1>basefont</KEYWORD1>
<KEYWORD1>bdi</KEYWORD1>
<KEYWORD1>bdo</KEYWORD1>
<KEYWORD1>big</KEYWORD1>
<KEYWORD1>blockquote</KEYWORD1>
<KEYWORD1>body</KEYWORD1>
<KEYWORD1>br</KEYWORD1>
<KEYWORD1>button</KEYWORD1>
<KEYWORD1>canvas</KEYWORD1>
<KEYWORD1>caption</KEYWORD1>
<KEYWORD1>center</KEYWORD1>
<KEYWORD1>cite</KEYWORD1>
<KEYWORD1>code</KEYWORD1>
<KEYWORD1>col</KEYWORD1>
<KEYWORD1>colgroup</KEYWORD1>
<KEYWORD1>command</KEYWORD1>
<KEYWORD1>data</KEYWORD1>
<KEYWORD1>datalist</KEYWORD1>
<KEYWORD1>dd</KEYWORD1>
<KEYWORD1>del</KEYWORD1>
<KEYWORD1>details</KEYWORD1>
<KEYWORD1>dfn</KEYWORD1>
<KEYWORD1>dir</KEYWORD1>
<KEYWORD1>div</KEYWORD1>
<KEYWORD1>dl</KEYWORD1>
<KEYWORD1>dt</KEYWORD1>
<KEYWORD1>em</KEYWORD1>
<KEYWORD1>embed</KEYWORD1>
<KEYWORD1>fieldset</KEYWORD1>
<KEYWORD1>figcaption</KEYWORD1>
<KEYWORD1>figure</KEYWORD1>
<KEYWORD1>font</KEYWORD1>
<KEYWORD1>footer</KEYWORD1>
<KEYWORD1>form</KEYWORD1>
<KEYWORD1>frame</KEYWORD1>
<KEYWORD1>frameset</KEYWORD1>
<KEYWORD1>h1</KEYWORD1>
<KEYWORD1>h2</KEYWORD1>
<KEYWORD1>h3</KEYWORD1>
<KEYWORD1>h4</KEYWORD1>
<KEYWORD1>h5</KEYWORD1>
<KEYWORD1>h6</KEYWORD1>
<KEYWORD1>head</KEYWORD1>
<KEYWORD1>header</KEYWORD1>
<KEYWORD1>hgroup</KEYWORD1>
<KEYWORD1>hr</KEYWORD1>
<KEYWORD1>html</KEYWORD1>
<KEYWORD1>i</KEYWORD1>
<KEYWORD1>iframe</KEYWORD1>
<KEYWORD1>img</KEYWORD1>
<KEYWORD1>input</KEYWORD1>
<KEYWORD1>ins</KEYWORD1>
<KEYWORD1>isindex</KEYWORD1>
<KEYWORD1>kbd</KEYWORD1>
<KEYWORD1>keygen</KEYWORD1>
<KEYWORD1>label</KEYWORD1>
<KEYWORD1>legend</KEYWORD1>
<KEYWORD1>li</KEYWORD1>
<KEYWORD1>link</KEYWORD1>
<KEYWORD1>map</KEYWORD1>
<KEYWORD1>mark</KEYWORD1>
<KEYWORD1>menu</KEYWORD1>
<KEYWORD1>meta</KEYWORD1>
<KEYWORD1>meter</KEYWORD1>
<KEYWORD1>nav</KEYWORD1>
<KEYWORD1>noframes</KEYWORD1>
<KEYWORD1>noscript</KEYWORD1>
<KEYWORD1>object</KEYWORD1>
<KEYWORD1>ol</KEYWORD1>
<KEYWORD1>optgroup</KEYWORD1>
<KEYWORD1>option</KEYWORD1>
<KEYWORD1>output</KEYWORD1>
<KEYWORD1>p</KEYWORD1>
<KEYWORD1>param</KEYWORD1>
<KEYWORD1>pre</KEYWORD1>
<KEYWORD1>progress</KEYWORD1>
<KEYWORD1>q</KEYWORD1>
<KEYWORD1>rp</KEYWORD1>
<KEYWORD1>rt</KEYWORD1>
<KEYWORD1>ruby</KEYWORD1>
<KEYWORD1>s</KEYWORD1>
<KEYWORD1>samp</KEYWORD1>
<KEYWORD1>script</KEYWORD1>
<KEYWORD1>section</KEYWORD1>
<KEYWORD1>select</KEYWORD1>
<KEYWORD1>small</KEYWORD1>
<KEYWORD1>source</KEYWORD1>
<KEYWORD1>span</KEYWORD1>
<KEYWORD1>strike</KEYWORD1>
<KEYWORD1>strong</KEYWORD1>
<KEYWORD1>style</KEYWORD1>
<KEYWORD1>sub</KEYWORD1>
<KEYWORD1>summary</KEYWORD1>
<KEYWORD1>sup</KEYWORD1>
<KEYWORD1>table</KEYWORD1>
<KEYWORD1>tbody</KEYWORD1>
<KEYWORD1>td</KEYWORD1>
<KEYWORD1>textarea</KEYWORD1>
<KEYWORD1>tfoot</KEYWORD1>
<KEYWORD1>th</KEYWORD1>
<KEYWORD1>thead</KEYWORD1>
<KEYWORD1>time</KEYWORD1>
<KEYWORD1>title</KEYWORD1>
<KEYWORD1>tr</KEYWORD1>
<KEYWORD1>track</KEYWORD1>
<KEYWORD1>tt</KEYWORD1>
<KEYWORD1>u</KEYWORD1>
<KEYWORD1>ul</KEYWORD1>
<KEYWORD1>var</KEYWORD1>
<KEYWORD1>video</KEYWORD1>
<KEYWORD1>wbr</KEYWORD1>
</KEYWORDS>
</RULES>
<!-- SCRIPT tag: Highlight tag and switch to language ruleset. -->
<RULES SET="SCRIPT_TAG" DEFAULT="MARKUP">
<!--If the content of the TYPE attribute is recognized, switch to
language specific ruleset. -->
<SEQ_REGEXP TYPE="MARKUP" DELEGATE="COFFEESCRIPT_TAG"
HASH_CHAR="type">type(?=\s*=\s*['"]?text/coffeescript)</SEQ_REGEXP>
<SEQ_REGEXP TYPE="MARKUP" DELEGATE="VBSCRIPT_TAG"
HASH_CHAR="type">type(?=\s*=\s*['"]?text/vbscript)</SEQ_REGEXP>
<SEQ_REGEXP TYPE="MARKUP" DELEGATE="VBSCRIPT_TAG"
HASH_CHAR="language">language(?=\s*=\s*['"]?vbscript)</SEQ_REGEXP>
<SEQ_REGEXP TYPE="MARKUP" DELEGATE="PYTHON_SCRIPT_TAG"
HASH_CHAR="type">type(?=\s*=\s*['"]?\w+/python)</SEQ_REGEXP>
<SEQ_REGEXP TYPE="MARKUP" DELEGATE="RUBY_SCRIPT_TAG"
HASH_CHAR="type">type(?=\s*=\s*['"]?\w+/ruby)</SEQ_REGEXP>
<SEQ_REGEXP TYPE="MARKUP" DELEGATE="XML_SCRIPT_TAG"
HASH_CHAR="type">type(?=\s*=\s*['"]?application/xml)</SEQ_REGEXP>
<SEQ_REGEXP TYPE="MARKUP" DELEGATE="XQUERY_SCRIPT_TAG"
HASH_CHAR="type">type(?=\s*=\s*['"]?\w+/xquery)</SEQ_REGEXP>
<!-- Switch to JavaScript ruleset after the tag. -->
<SEQ TYPE="MARKUP" DELEGATE="JAVASCRIPT">></SEQ>
<!-- Import rules for highlighting. -->
<IMPORT DELEGATE="TAGS"/>
</RULES>
<!-- JavaScript (NOTE: RULES attributes must match the imported rules.)-->
<RULES SET="JAVASCRIPT"
IGNORE_CASE="FALSE"
HIGHLIGHT_DIGITS="TRUE"
DIGIT_RE="(0x[\p{XDigit}]+[lL]?|[\p{Digit}]+(e[\p{Digit}]*)?[lLdDfF]?)">
<!-- "Override" comments to avoid consuming the </SCRIPT> tag. -->
<SPAN_REGEXP TYPE="COMMENT1" HASH_CHAR="/*">
<BEGIN>/\*</BEGIN>
<END REGEXP="TRUE">(?i)(?=</SCRIPT\b)</END>
</SPAN_REGEXP>
<SEQ_REGEXP TYPE="COMMENT2" HASH_CHAR="//">(?i)//.*(?=</SCRIPT\b)</SEQ_REGEXP>
<!-- If closing </SCRIPT> tag is found, switch to ENDTAG ruleset. -->
<SEQ_REGEXP TYPE="MARKUP" DELEGATE="ENDTAG"
HASH_CHAR="<">(?i)<(?=/SCRIPT\b)</SEQ_REGEXP>
<!-- Import rules for JavaScript mode. -->
<IMPORT DELEGATE="javascript::MAIN"/>
</RULES>
<!-- CoffeeScript -->
<RULES SET="COFFEESCRIPT_TAG" DEFAULT="MARKUP">
<SEQ TYPE="MARKUP" DELEGATE="COFFEESCRIPT">></SEQ>
<IMPORT DELEGATE="TAGS"/>
</RULES>
<RULES SET="COFFEESCRIPT"
IGNORE_CASE="FALSE"
HIGHLIGHT_DIGITS="TRUE"
NO_WORD_SEP="$_"
DIGIT_RE="(0b[01]+)|(0o[0-7]+)|(0x\p{XDigit}+)|(\d*\.?\d+(e[+-]?\d+)?)">
<SPAN_REGEXP TYPE="COMMENT2" HASH_CHAR="###">
<BEGIN>###(?!#)</BEGIN>
<END REGEXP="TRUE">(?i)(?=</SCRIPT\b)</END>
</SPAN_REGEXP>
<SEQ_REGEXP TYPE="COMMENT1" HASH_CHAR="#">(?i)#.*(?=</SCRIPT\b)</SEQ_REGEXP>
<SEQ_REGEXP TYPE="MARKUP" DELEGATE="ENDTAG"
HASH_CHAR="<">(?i)<(?=/SCRIPT\b)</SEQ_REGEXP>
<IMPORT DELEGATE="coffeescript::MAIN"/>
</RULES>
<!-- Python - provided by Gestalt -->
<RULES SET="PYTHON_SCRIPT_TAG" DEFAULT="MARKUP">
<SEQ TYPE="MARKUP" DELEGATE="PYTHON">></SEQ>
<IMPORT DELEGATE="TAGS"/>
</RULES>
<RULES SET="PYTHON" IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE">
<SEQ_REGEXP TYPE="COMMENT1" HASH_CHAR="#">(?i)#.*(?=</SCRIPT\b)</SEQ_REGEXP>
<SEQ_REGEXP TYPE="MARKUP" DELEGATE="ENDTAG"
HASH_CHAR="<">(?i)<(?=/SCRIPT\b)</SEQ_REGEXP>
<IMPORT DELEGATE="python::MAIN"/>
</RULES>
<!-- Ruby - provided by Gestalt -->
<RULES SET="RUBY_SCRIPT_TAG" DEFAULT="MARKUP">
<SEQ TYPE="MARKUP" DELEGATE="RUBY">></SEQ>
<IMPORT DELEGATE="TAGS"/>
</RULES>
<RULES SET="RUBY" IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE"
DIGIT_RE="(0b[01]([01_]*[01])?)|(0x[\p{XDigit}]([\p{XDigit}_]*[\p{XDigit}])?)|(0([0-7_]*[0-7])?)|(0d[0-9]([0-9_]*[0-9])?)|([1-9]([0-9_]*[0-9])?)|([0-9]([0-9_]*[0-9])?[Ee]([0-9]([0-9_]*[0-9])?)?)">
<SEQ_REGEXP TYPE="COMMENT1" HASH_CHAR="#">(?i)#.*(?=</SCRIPT\b)</SEQ_REGEXP>
<SEQ_REGEXP TYPE="MARKUP" DELEGATE="ENDTAG"
HASH_CHAR="<">(?i)<(?=/SCRIPT\b)</SEQ_REGEXP>
<IMPORT DELEGATE="ruby::MAIN"/>
</RULES>
<!-- VBScript - provided by Internet Explorer -->
<RULES SET="VBSCRIPT_TAG" DEFAULT="MARKUP">
<SEQ TYPE="MARKUP" DELEGATE="VBSCRIPT">></SEQ>
<IMPORT DELEGATE="TAGS"/>
</RULES>
<RULES SET="VBSCRIPT" HIGHLIGHT_DIGITS="TRUE">
<SEQ_REGEXP TYPE="COMMENT1" HASH_CHAR="'">'.*(?=</SCRIPT\b)</SEQ_REGEXP>
<SEQ_REGEXP TYPE="COMMENT1" HASH_CHAR="rem">rem(\b.*)?(?=</SCRIPT\b)</SEQ_REGEXP>
<SEQ_REGEXP TYPE="MARKUP" DELEGATE="ENDTAG"
HASH_CHAR="<"><(?=/SCRIPT\b)</SEQ_REGEXP>
<IMPORT DELEGATE="vbscript::MAIN"/>
</RULES>
<!-- XML - for XAML, provided by Gestalt -->
<RULES SET="XML_SCRIPT_TAG" DEFAULT="MARKUP">
<SEQ TYPE="MARKUP" DELEGATE="XML">></SEQ>
<IMPORT DELEGATE="TAGS"/>
</RULES>
<RULES SET="XML">
<SEQ_REGEXP TYPE="MARKUP" DELEGATE="ENDTAG"
HASH_CHAR="<"><(?=/SCRIPT\b)</SEQ_REGEXP>
<IMPORT DELEGATE="xml::MAIN"/>
</RULES>
<!-- XQUERY - provided by XQIB -->
<RULES SET="XQUERY_SCRIPT_TAG" DEFAULT="MARKUP">
<SEQ TYPE="MARKUP" DELEGATE="XQUERY">></SEQ>
<IMPORT DELEGATE="TAGS"/>
</RULES>
<RULES SET="XQUERY">
<SEQ_REGEXP TYPE="MARKUP" DELEGATE="ENDTAG"
HASH_CHAR="<"><(?=/SCRIPT\b)</SEQ_REGEXP>
<IMPORT DELEGATE="xq::MAIN"/>
</RULES>
<!-- STYLE tag: Highlight tag and delegate to CSS mode. -->
<RULES SET="STYLE_TAG" DEFAULT="MARKUP">
<SEQ TYPE="MARKUP" DELEGATE="CSS">></SEQ>
<IMPORT DELEGATE="TAGS"/>
</RULES>
<RULES SET="CSS"
HIGHLIGHT_DIGITS="TRUE"
DIGIT_RE="-?\d+(\.\d+)?(pt|pc|in|mm|cm|em|ex|px|ms|s|%|)"
NO_WORD_SEP="-_%">
<SEQ_REGEXP TYPE="MARKUP" DELEGATE="ENDTAG"
HASH_CHAR="<"><(?=/STYLE\b)</SEQ_REGEXP>
<IMPORT DELEGATE="css::MAIN"/>
</RULES>
<!-- Closing tag: Highlight tag and return to MAIN ruleset. -->
<RULES SET="ENDTAG" DEFAULT="MARKUP">
<SEQ TYPE="MARKUP" DELEGATE="MAIN">></SEQ>
<IMPORT DELEGATE="TAGS"/>
</RULES>
<RULES SET="STRING" DEFAULT="LITERAL1">
<SPAN TYPE="LITERAL2" NO_WORD_BREAK="TRUE">
<BEGIN>&</BEGIN>
<END>;</END>
</SPAN>
</RULES>
</MODE>